package com.hsgene.goods.condition;

import com.hsgene.common.util.date.SimpleDateUtils;
import com.hsgene.common.util.support.LimitHelper;
import com.hsgene.common.util.support.OrderHelper;

import java.io.Serializable;
import java.util.Date;

/**
 * 原始商品信息查询条件
 *
 * @author wangbing
 * @version 1.0, 2018/7/25
 */
public class GoodsOriginCondition implements Serializable {

    private static final long serialVersionUID = 8904790578125028373L;
    /**
     * 发布时间开始
     */
    private Date publishTimeStart;

    /**
     * 发布时间结束
     */
    private Date publishTimeEnd;

    /**
     * 商品状态
     */
    private Integer status;

    /**
     * 搜索关键字-套餐名称（全匹配）
     */
    private String goodsName;

    /**
     * 检测机构id
     */
    private Long supplerDoId;

    /**
     * 检测类型
     */
    private Integer detectionType;

    /**
     * 采样方式
     */
    private Integer sampleMode;

    /**
     * 是否查询商品检测相关信息
     */
    private boolean queryDetection = true;

    /**
     * 分页条件
     */
    private LimitHelper limitHelper;

    /**
     * 排序条件
     */
    private OrderHelper orderHelper;

    public Date getPublishTimeStart() {
        return publishTimeStart;
    }

    public void setPublishTimeStart(Date publishTimeStart) {
        this.publishTimeStart = publishTimeStart;
    }

    public void setPublishTimeStart(String publishTimeStart) {
        Date date = SimpleDateUtils.parseDate(publishTimeStart, SimpleDateUtils.DatePattern.STANDARD_PATTERN.toString());
        this.publishTimeStart = date;
    }

    public Date getPublishTimeEnd() {
        return publishTimeEnd;
    }

    public void setPublishTimeEnd(Date publishTimeEnd) {
        this.publishTimeEnd = publishTimeEnd;
    }

    public void setPublishTimeEnd(String publishTimeEnd) {
        Date date = SimpleDateUtils.parseDate(publishTimeEnd, SimpleDateUtils.DatePattern.STANDARD_PATTERN.toString());
        this.publishTimeEnd = date;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Long getSupplerDoId() {
        return supplerDoId;
    }

    public void setSupplerDoId(Long supplerDoId) {
        this.supplerDoId = supplerDoId;
    }

    public Integer getDetectionType() {
        return detectionType;
    }

    public void setDetectionType(Integer detectionType) {
        this.detectionType = detectionType;
    }

    public Integer getSampleMode() {
        return sampleMode;
    }

    public void setSampleMode(Integer sampleMode) {
        this.sampleMode = sampleMode;
    }

    public boolean getQueryDetection() {
        return queryDetection;
    }

    public void setQueryDetection(boolean queryDetection) {
        this.queryDetection = queryDetection;
    }

    public LimitHelper getLimitHelper() {
        return limitHelper;
    }

    public void setLimitHelper(LimitHelper limitHelper) {
        this.limitHelper = limitHelper;
    }

    public OrderHelper getOrderHelper() {
        return orderHelper;
    }

    public void setOrderHelper(OrderHelper orderHelper) {
        this.orderHelper = orderHelper;
    }
}
